package com.chixing.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chixing.entity.Camera;
import com.chixing.mapper.CameraMapper;
import com.chixing.service.ICameraService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chixing.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author smith
 * @since 2025-05-27
 */
@Service
public class CameraServiceImpl  implements ICameraService {
    @Autowired
    private CameraMapper cameraMapper;

    @Override
    public Result getById(Integer cameraId) {
        Camera camera = cameraMapper.selectById(cameraId);
        if (camera != null)
            return Result.getSuccess(camera);
        return Result.getFail(null);
    }
}

